package com.shunbo.convenient.controller;

import com.shunbo.convenient.utils.ConvenientResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author weizhuang
 * 银行
 */
@RestController
public class BankController {

    /**
     * 银行列表
     * @return Result结果集
     */
    @RequestMapping("/list")
    public ConvenientResult getAddressList(){
        try {

            List<String> all = new ArrayList<>();
            all.add("中国银行");
            all.add("中国建设银行");
            return ConvenientResult.build(200,"成功",all);
        }catch (Exception e){
            e.printStackTrace();
            return ConvenientResult.build(500,"系统错误",e.getStackTrace());
        }
    }

}
